Maximum Segment Sum, Monadically (distilled tutorial)

نویسندگان

چکیده

برای دانلود باید عضویت طلایی داشته باشید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Maximum Segment Sum, Monadically (distilled tutorial)

The maximum segment sum problem is to compute, given a list of integers, the largest of the sums of the contiguous segments of that list. This problem specification maps directly onto a cubic-time algorithm; however, there is a very elegant linear-time solution too. The problem is a classic exercise in the mathematics of program construction, illustrating important principles such as calculatio...

متن کامل

Maximum Segment Sum, Monadically (distilled tutorial, with solutions)

The maximum segment sum problem is to compute, given a list of integers, the largest of the sums of the contiguous segments of that list. This problem specification maps directly onto a cubic-time algorithm; however, there is a very elegant linear-time solution too. The problem is a classic exercise in the mathematics of program construction, illustrating important principles such as calculatio...

متن کامل

Hygienic Quasiquotation in Scheme Distilled Tutorial

Quasiquotation in Scheme is nearly ideal for implementing programs that generate other programs. These programs lack only the ability to generate fresh bound identifiers, as required to make such code-manipulating programs hygienic, but any Scheme programmer knows how to provide this ability using gensym. In this tutorial we investigate hygienic quasiquotation in Scheme and in languages influen...

متن کامل

Optimal algorithms for the average-constrained maximum-sum segment problem

a r t i c l e i n f o a b s t r a c t Given a real number sequence A = (a 1 , a 2 ,. .. ,a n), an average lower bound L, and an average upper bound U , the Average-Constrained Maximum-Sum Segment problem is to locate a segment A(i, j) = (a i , a i+1 ,. .. ,a j) that maximizes ik j a k subject to L (ik j a k)/(j − i + 1) U. In this paper, we give an O (n)-time algorithm for the case where the av...

متن کامل

Parallel Programming, List Homomorphisms and the Maximum Segment Sum Problem

We review the use of the Bird-Meertens Formalism as a vehicle for the construction of programs with massive implicit parallelism. We show that a simple result from the theory, concerning the expression of list homomorph-isms, can help us in our search for parallel algorithms and demonstrate its application to some simple problems including the maximum segment sum problem. Our main purpose is to...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

ژورنال

عنوان ژورنال: Electronic Proceedings in Theoretical Computer Science

سال: 2011

ISSN: 2075-2180

DOI: 10.4204/eptcs.66.9